﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace NuSoft.ExpressionEditor.Common.Interfaces
{
    /// <summary>
    /// Parser interface. 
    /// </summary>
    public interface IParser
    {
        /// <summary>
        /// Gets methods supported by parser. 
        /// </summary>
        IEnumerable<ISupportedMethod> SupportedMethods { get; }

        /// <summary>
        /// Parses expression using source object. 
        /// </summary>
        /// <param name="obj">Source object. </param>
        /// <param name="expr">Expression. </param>
        /// <returns>Parsing result. </returns>
        IParsingResult Parse(object obj, string expr);
    }
}